package com.novatialabs.qttt.gwt.client;

import com.google.gwt.event.shared.GwtEvent;

public class GameDisplayEvent extends GwtEvent<GameDisplayHandler> {

  /**
   * Event type for click events. Represents the meta-data associated with this
   * event.
   */
  private static final Type<GameDisplayHandler> TYPE = new Type<GameDisplayHandler>();

  /**
   * Gets the event type associated with click events.
   * 
   * @return the handler type
   */
  public static Type<GameDisplayHandler> getType() {
    return TYPE;
  }

  private final GameModel game;

  public GameDisplayEvent(GameModel game) {
    this.game = game;
  }

  @Override
  protected void dispatch(GameDisplayHandler handler) {
    handler.display(this);

  }

  @Override
  public Type<GameDisplayHandler> getAssociatedType() {
    return TYPE;
  }

  public GameModel getGame() {

    return game;
  }

}
